<template>
    <div>
        全局组件
        <!-- <span>{{ fromson }}</span> -->
        <!-- <slot></slot> -->
        <!-- <slot name="name1"></slot> -->
        <hr>
        <slot :obj="obj"></slot>
        <hr>
        <!-- <slot :obj="obj" name="w1"></slot> -->
        <!-- <slot :data="data" name="w2"></slot> -->

    </div>
</template>

<script>
import bus from '../JS/bus.js'
export default {
    data() {
        return {
            fromson: '',
            data:'美国',
            obj:[{name:'李三'},{name:'张四'}]
        }
    },
    created() {
        bus.$on('seng1', (val) => {
            this.fromson = val
        })
    }
}
</script>

<style scoped></style>